<?php
/**
 * User: Drery
 * Date: 2015/12/14
 * Time: 14:27
 */

namespace backend\components;


use backend\models\Permission;
use yii\base\Widget;

class SidenavWidget extends Widget
{
    public function run()
    {
        $permissions = \Yii::$app->user->identity->permissionIds;
        $nodeList = Permission::getNodeList();
        return $this->render('navbar',[
            'permissions' => $permissions,
            'nodeList' => $nodeList
        ]);
    }
}